﻿using HRESULT = System.Int32;

namespace Microsoft.Office.OneNote
{
    internal static class NativeErrorCodes
    {
        internal const HRESULT OneNoteFirst = MALFORMED_XML_ERROR;
        internal const HRESULT OneNoteLast = LEGACY_SECTION;

        // OneNote
        public const HRESULT MALFORMED_XML_ERROR = unchecked((HRESULT)(0x80042000));
        public const HRESULT INVALID_XML_ERROR = unchecked((HRESULT)(0x80042001));
        public const HRESULT ERROR_CREATING_SECTION = unchecked((HRESULT)(0x80042002));
        public const HRESULT ERROR_OPENING_SECTION = unchecked((HRESULT)(0x80042003));
        public const HRESULT SECTION_DOES_NOT_EXIST_ERROR = unchecked((HRESULT)(0x80042004));
        public const HRESULT PAGE_DOES_NOT_EXIST_ERROR = unchecked((HRESULT)(0x80042005));
        public const HRESULT FILE_DOES_NOT_EXIST_ERROR = unchecked((HRESULT)(0x80042006));
        public const HRESULT ERROR_INSERTING_IMAGE = unchecked((HRESULT)(0x80042007));
        public const HRESULT ERROR_INSERTING_INK = unchecked((HRESULT)(0x80042008));
        public const HRESULT ERROR_INSERTING_HTML = unchecked((HRESULT)(0x80042009));
        public const HRESULT ERROR_NAVIGATING_TO_PAGE = unchecked((HRESULT)(0x8004200a));
        public const HRESULT SECTION_IS_READ_ONLY = unchecked((HRESULT)(0x8004200b));
        public const HRESULT PAGE_IS_READ_ONLY = unchecked((HRESULT)(0x8004200c));
        public const HRESULT ERROR_INSERTING_OUTLINETEXT = unchecked((HRESULT)(0x8004200d));
        public const HRESULT PAGE_OBJECT_DOES_NOT_EXIST_ON_PAGE = unchecked((HRESULT)(0x8004200e));
        public const HRESULT BINARY_OBJECT_DOES_NOT_EXIST_ON_PAGE = unchecked((HRESULT)(0x8004200f));
        public const HRESULT LAST_MODIFIED_DATE_DID_NOT_MATCH = unchecked((HRESULT)(0x80042010));
        public const HRESULT GROUP_DOES_NOT_EXIST_IN_SECTION = unchecked((HRESULT)(0x80042011));
        public const HRESULT PAGE_NOT_IN_SPECFIED_GROUP = unchecked((HRESULT)(0x80042012));
        public const HRESULT NO_ACTIVE_SELECTION_OR_IP = unchecked((HRESULT)(0x80042013));
        public const HRESULT OBJECT_DOES_NOT_XIST = unchecked((HRESULT)(0x80042014));
        public const HRESULT NOTEBOOK_DOES_NOT_EXIST = unchecked((HRESULT)(0x80042015));
        public const HRESULT INSERTING_FILE = unchecked((HRESULT)(0x80042016));
        public const HRESULT INVALID_NAME = unchecked((HRESULT)(0x80042017));
        public const HRESULT FOLDER_DOES_NOT_EXIST = unchecked((HRESULT)(0x80042018));
        public const HRESULT INVALID_QUERY = unchecked((HRESULT)(0x80042019));
        public const HRESULT FILE_ALREADY_EXISTS = unchecked((HRESULT)(0x8004201a));
        public const HRESULT SECTION_ENCRYPTED_AND_LOCKED = unchecked((HRESULT)(0x8004201b));
        public const HRESULT DISABLED_BY_POLICY = unchecked((HRESULT)(0x8004201c));
        public const HRESULT NOT_YET_SYNCHRONIZED = unchecked((HRESULT)(0x8004201d));
        public const HRESULT LEGACY_SECTION = unchecked((HRESULT)(0x8004201e));

        // Windows
        public const HRESULT REGDB_E_CLASSNOTREG = unchecked((HRESULT)(0x80040154));
    }
}
